package com.demo.my.Service;

import com.demo.my.Dao.AttendanceDao;
import com.demo.my.Entity.Attendance;
import com.demo.my.Entity.Attendance_Sheet;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class AttendanceService {
    private AttendanceDao attendanceDao=new AttendanceDao();

    public List<Attendance_Sheet> getAttendanceList() throws Exception {
        return attendanceDao.getAttendanceList();
    }

    public List<Attendance_Sheet> getAttendanceList(Integer employeeNumber) throws Exception {
        return attendanceDao.getAttendanceList(employeeNumber);
    }
    public void addAttendance(Attendance attendance) throws Exception {
        attendanceDao.addAttendance(attendance);
    }
    public Attendance getOne(String sql, Attendance o, Object... obj) throws Exception {

        return attendanceDao.getOne(sql,o,obj);
    }

    public void updateAttend(int aid,String status,String type,String time) throws SQLException {
        attendanceDao.updateAttend(aid,status,type,time);
    }
}
